﻿using System;
using System.Collections;

namespace Dune.Business.Domain.Dictionaries
{
    public interface IDictionariesManager
    {
        bool IsDictionary(Type type);


        /// <summary>
        /// return dictionary contents (elementts list)
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        ICollection GetDictionary(Type type);

        /// <summary>
        /// generic accessor for method ICollection GetDictionary(Type type)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        System.Collections.Generic.ICollection<T> GetDictionary<T>();

        /// <summary>
        /// return element of dictionary
        /// </summary>
        /// <param name="id"></param>
        /// <param name="dictionaryType"></param>
        /// <returns></returns>
        object GetDictionaryElement(object id, Type dictionaryType);

        /// <summary>
        /// generic accessor for method object GetDictionaryElement(object id, Type dictionaryType)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <typeparam name="TID"></typeparam>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetDictionaryElement<T, TID>(TID id);

    }
}